﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using DingHeng.TransportationManagement.Entity;

namespace DingHeng.TransportationManagement.DataAccess
{
    public class VehicleInfoDataAccess:IDisposable
    {
        private DAOBase<VehicleInfo> vehicleInfoDao;
        public VehicleInfoDataAccess() { }
        public IQueryable<VehicleInfo> LoadByCondition(Expression<Func<VehicleInfo, bool>> condition)
        {
            vehicleInfoDao = new DAOBase<VehicleInfo>();
            return vehicleInfoDao.LoadByCondition(condition);
        }

        #region IDisposable 成员

        public void Dispose()
        {
            if (vehicleInfoDao != null)
            {
                vehicleInfoDao.Dispose();
            }
        }

        #endregion
    }
}
